<!DOCTYPE html>
<html>
<head>
    <title>#{title}</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
    <meta name="description" content="">

    <link rel="stylesheet" href="../../lib/weui.min.css">
    <link rel="stylesheet" href="../../css/jquery-weui.css">
    <link rel="stylesheet" href="../../css/home.css">
<style>
    body{line-height: unset}
    .patients{color: #000;
        -webkit-tap-highlight-color: rgba(0,0,0,0);padding:8px 0px;border-bottom: lightgray dashed 1px}
    .weui-media-box_appmsg .weui-media-box__hd{margin-right:0.4em}
    .sub-title{font-size: 12px;color:#999}
    .weui-media-box__title{color:#4b4a48}
    .cha-way{position: absolute;right:0px;bottom: -3px;font-size: 11px}
    .info-block{position: relative; color: lightgray}
    .weui-cell__bd{font-size:0.8rem}
</style>
</head>
<body>
<div class="weui-flex">
    <div class="weui-flex__item">
        <div class="home-header">
            <span class="back-to-pre"></span>
            <h2>认证列表</h2>
        </div>
    </div>
</div>



<div class="weui-panel">
    <div class="weui-panel__hd">医师列表</div>
    <div class="weui-panel__bd">
        <div class="weui-media-box weui-media-box_small-appmsg">
            <div class="weui-cells" id="authenticationList">
                <a href="javascript:void(0);" class="patients weui-media-box_appmsg">
                    <div class="weui-media-box__hd">
                        <img class="weui-media-box__thumb" src="../images//avatar3.jpg" alt="">
                    </div>
                    <div class="weui-media-box__bd info-block" >
                        <h4 class="weui-media-box__title">
                            江户川-元芳 <span class="sub-title">男 34岁</span>
                            <span class="weui-media-box__title-after" style="font-size:10px">上午10:15</span>
                        </h4>
                        <p class="weui-media-box__desc" style="font-size: 11px;margin-top: 5px;">13757178844</p>
                        <span class="cha-way">扫码关注</span>
                    </div>
                </a>

                <a href="javascript:void(0);" class="patients weui-media-box_appmsg">
                    <div class="weui-media-box__hd">
                        <img class="weui-media-box__thumb" src="../images//avatar3.jpg" alt="">
                    </div>
                    <div class="weui-media-box__bd info-block" >
                        <h4 class="weui-media-box__title">
                            江户川 <span class="sub-title">男 34岁</span>
                            <span class="weui-media-box__title-after" style="font-size:10px">上午10:15</span>
                        </h4>
                        <p class="weui-media-box__desc" style="font-size: 11px;margin-top: 5px;">13757178844</p>
                        <span class="cha-way">扫码关注</span>
                    </div>
                </a>

            </div>
        </div>
    </div>
</div>
<script src="/lib/jquery-2.1.4.js"></script>
<script src="/lib/fastclick.js"></script>
<script src="/js/home.js"></script>
<script>
    $(function(){
       $.ajax({
          url:"/authentication/getAuthenticationList",
           type:"post",
           dataType:"json",
           data:"",
           success:function(result){
               console.log(result.msg);
               var itemContent = "";
               $(result.data).each(function(){
                   itemContent += "<a href='javascript:void(0);' class='patients weui-media-box_appmsg'>"+
                           "<div class='weui-media-box__hd'>"+
                           "<img class='weui-media-box__thumb' src='"+this.doctor.picPath+"' alt=''>"+
                           "</div>"+
                           "<div class='weui-media-box__bd info-block' >"+
                           this.doctor.doctorname+"<span class='sub-title'>"+this.doctor.sex+" 34岁</span>"+
                           "<span class='weui-media-box__title-after' style='font-size:10px'>";

                   itemContent += getMyDate(this.doctor.doctorCreatedate);
                   itemContent += "</span>"+
                           "</h4>"+
                           "<p class='weui-media-box__desc' style='font-size: 11px;margin-top: 5px;'>"+this.doctor.phone+"</p>"+
                           "<span class='cha-way'>";

                   if(this.status == 0){
                       itemContent += "<font color='red'>未审核</font>";
                   }else if(this.status == 1){
                       itemContent += "<font color='#f4a460'>已提交资料，未审核</font>";
                   }else if(this.status == 2){
                       itemContent += "<font color='green'>审核通过</font>";
                   }else if(this.status == 1){
                       itemContent += "<font color='red'>审核未通过</font>";
                   }

                   itemContent += "</span>"+
                           "</div>"+
                           "</a>";
               });
               $("#authenticationList").html(itemContent);
           },error:function(){
               console.log("ajax出错");
           }
       });
    });

    function getMyDate(str){
        var oDate = new Date(str),
                oYear = oDate.getFullYear(),
                oMonth = oDate.getMonth()+1,
                oDay = oDate.getDate(),
                oHour = oDate.getHours(),
                oMin = oDate.getMinutes(),
                oSen = oDate.getSeconds(),
                oTime = oYear +'-'+ getzf(oMonth) +'-'+ getzf(oDay) +' '+ getzf(oHour) +':'+ getzf(oMin) +':'+getzf(oSen);//最后拼接时间
        return oTime;
    };
    //补0操作
    function getzf(num){
        if(parseInt(num) < 10){
            num = '0'+num;
        }
        return num;
    }
</script>
</body>
</html>